<%@ page import="org.apache.struts2.ServletActionContext" %>
<%@ page import="com.zzc.bean.Employee" %>
<%@ page import="static org.apache.struts2.ServletActionContext.getResponse" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<!DOCTYPE html>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://"
          + request.getServerName() + ":" + request.getServerPort()
          + path + "/";
%>
<html>
<head>
  <title>Insert title here</title>
  <link href="<%=path%>/assets/css/mycss/main.css" rel="stylesheet" type="text/css" />
  <link href="http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
  Employee employee= (Employee) session.getAttribute("employee");
  if (employee==null){
    employee=new Employee();
    System.out.println("employee为空");
    response.sendRedirect(request.getContextPath()+"/view/index.jsp");
  }
  else {
    System.out.println("employee不为空");
  }
%>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="wrap">
  <tbody><tr>
    <td colspan="2" height="45" class="MainTop">
      <div class="dLogo"><i class="fa fa-tags" aria-hidden="true"></i>Plataforma de servio administrativo, CLP</div>
      <div class="dRight">
        <ul>
<%--          <li class="online">当前在线人数：1</li>--%>
          <li class="welcome">
            <a class="user" href="<%=path%>/Action/Action_EmployeeAction_login_out">
              <img class="user-photo" src="img/head0.jpg">
              <span class="user-name">
                                    <small>Bienvenido,</small>
                                    <small><%=employee.getEmployee_name()%></small>
                                </span>
              <i class="fa fa-caret-down"></i>
            </a>
            <div class="user-menu" style="display: none;">
              <ul>
                <li><a href="#"><i class="fa fa-user"></i>我的账户</a></li>
                <li class="ider"></li>
                <li><a href="<%=path%>/Action/Action_EmployeeAction_login_out"><i class="fa fa-power-off"></i>退出</a></li>
              </ul>
            </div>
          </li>
        </ul>
      </div>
    </td>
  </tr>
  <tr>
    <td width="190" valign="top" class="MainLeft">
      <div class="leftMenu" style="width: 189px;">
        <ul>
          <li>
            <a href="<%=path%>/view/diningReceipt/diningReceipt_index.jsp" target="mainFrame"><i class="fa fa-smile-o" aria-hidden="true"></i>Registro</a>
          </li>
          <li>
            <a href="<%=path%>/view/diningReceipt/diningReceipt_sum_index.jsp" target="mainFrame"><i class="fa fa-smile-o" aria-hidden="true"></i>Resumen</a>
          </li>
          <%
            if (employee.getEmployee_account().equals("admin")){
          %>
          <li>
            <a href="<%=path%>/Action/Action_EmployeeAction_getAll" target="mainFrame" onclick=""><i class="fa fa-user" aria-hidden="true"></i>Admin de usuarios</a>
          </li>
          <li>
            <a href="<%=path%>/Action/Action_SystemSetAction_systemSetJsp" target="mainFrame" onclick=""><i class="fa fa-user" aria-hidden="true"></i>Configuración</a>
          </li>
          <%
            }
          %>

        </ul>
        <div class="sidebar">
          <a href="javascript:void(0);"><i class="fa fa-angle-double-left"></i><em></em></a>
        </div>
      </div>
    </td>
    <td valign="top">
      <div class="tool">
        <ul>
          <li class="work selected" title="Mesa de trabajo">Mesa de trabajo</li>
        </ul>
      </div>
      <div class="container">
        <iframe src="<%=path%>/view/admin/mainFrame_main.jsp" id="mainFrame" name="mainFrame" scrolling="yes" frameborder="no" width="100%" height="100%">

        </iframe>
      </div>
    </td>
  </tr>
</table>
</body>
</html>